﻿// Copyright 2009 Mike Geise
// 
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
// 
//     http://www.apache.org/licenses/LICENSE-2.0
// 
// Unless required by applicable law or agreed to in writing, software
// distributed under the License is distributed on an "AS IS" BASIS,
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
// See the License for the specific language governing permissions and
// limitations under the License.

namespace Falcon.Core.Domain.Services
{
	using Falcon.Core.Collections;
	using Falcon.Core.Domain.Values;

	public interface IUserGroupService
	{
		/// <summary>
		/// Gets the user group by the specified specification.
		/// </summary>
		/// <param name="specification">The <see cref="UserGroupSpecification"/>.</param>
		UserGroup GetBy(UserGroupSpecification specification);

		/// <summary>
		/// Gets the user group by id.
		/// </summary>
		/// <param name="id">The id.</param>
		UserGroup GetById(int id);

		/// <summary>
		/// Gets all the users groups.
		/// </summary>
		/// <param name="specification">The <see cref="UserGroupSpecification"/>.</param>
		IPagedList<UserGroup, UserGroupSpecification> GetPaged(UserGroupSpecification specification);

		/// <summary>
		/// Creates the user group.
		/// </summary>
		UserGroup Create();

		/// <summary>
		/// Populates the specified group members, comments and photos.
		/// </summary>
		/// <param name="group">The group.</param>
		/// <param name="page">The page.</param>
		void Populate(UserGroup group, int? page);

		/// <summary>
		/// Inserts the user group into the storage.
		/// </summary>
		/// <param name="group">The group.</param>
		void Insert(UserGroup group);

		/// <summary>
		/// Inserts the user group into the storage.
		/// </summary>
		/// <param name="group">The group.</param>
		/// <param name="value">The value.</param>
		void Insert(UserGroup group, UserGroupCreate value);

		/// <summary>
		/// Updates the user group in the storage.
		/// </summary>
		/// <param name="group">The group.</param>
		void Update(UserGroup group);

		/// <summary>
		/// Updates the user group in the storage.
		/// </summary>
		/// <param name="group">The group.</param>
		/// <param name="value">The value.</param>
		void Update(UserGroup group, UserGroupUpdate value);

		/// <summary>
		/// Deletes the user group in the storage.
		/// </summary>
		/// <param name="group">The group.</param>
		void Delete(UserGroup group);
	}
}